package com.example.fitnessservice.service.impl;


import com.example.fitnessservice.module.dao.UserLoginDao;
import com.example.fitnessservice.module.pojo.UserLogin;
import com.example.fitnessservice.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserLoginServiceImpl implements UserLoginService {
    @Autowired
    private UserLoginDao userLoginDao;

//注册
    @Override
    public Boolean register(UserLogin userLogin) {
        int count = userLoginDao.register(userLogin);
        return count<1?false:true;
    }
//登录
    @Override
    public UserLogin login(UserLogin userLogin) {
        UserLogin login = userLoginDao.login(userLogin);
        return login;
    }

    @Override
    public UserLogin username(String username) {
        return userLoginDao.username(username);
    }
}
